import request from '@/utils/request'
import { host } from '@/api/common'

// 任务列表
export function get_task(data) {
  return request({
    url: host + "/api/task/task_list",
    method: 'post',
    data
  })
}

// 获取单个任务
export function get_single_task(data) {
  return request({
    url: host + "/api/task/single_task",
    method: 'post',
    data
  })
}

// 添加接口自动化任务
export function add_single_task(data) {
  return request({
    url: host + "/api/task/add_task",
    method: "post",
    data
  })
}

// 编辑接口自动化任务
export function edit_sigle_task(data) {
  return request({
    url: host + "/api/task/edit_task",
    method: "post",
    data
  })
}

// 删除任务
export function delete_task(data) {
  return request({
    url: host + "/api/task/delete_task",
    method: "post",
    data
  })
}

// 查看任务结果
export function get_task_result(data) {
  return request({
    url: host + "/api/task/get_task_result",
    method: "post",
    data
  })
}

// 查看详细结果
export function get_task_result_details(data) {
  return request({
    url: host + "/api/task/get_task_result_details",
    method: "post",
    data
  })
}
